#ifndef _AK_MASK_H_
#define _AK_MASK_H_

#define MAX_MASK	4

enum mask_color_type {
	MASK_ORIGINAL_VIDEO = 0,	/* masked with original video data*/
	MASK_MOSAIC_VIDEO,			/* masked with mosaic video data*/
	MASK_MOSAIC_WHITE_VIDEO,	/* masked with mosaic & white 50% video data*/
	MASK_MOSAIC_BLACK_VIDEO,	/* masked with mosaic & black 50% video data*/
};

struct mask_color_info {
	/* defined by enum mask_color_type*/
	unsigned char color_type;

	/* range [0, 0xff]. if 0 mask video opaquely, then can not see image */
	unsigned char mk_alpha;

	/* range [0, 0xff] */
	unsigned char y_mk_color;
	/* range [0, 0xff] */
	unsigned char u_mk_color;
	/* range [0, 0xff] */
	unsigned char v_mk_color;
};

struct mask_area {
	unsigned short start_xpos;
	unsigned short end_xpos;
	unsigned short start_ypos;
	unsigned short end_ypos;
	unsigned char enable;
};

struct mask_area_info {
	struct mask_area main_mask[MAX_MASK];
	struct mask_area sub_mask[MAX_MASK];
};

/**
 * ak_mask_get_version - get version of mask module
 * return: version string
 * notes: 
 */
const char* ak_mask_get_version(void);

/**  
 * brief: set main & sub channel mask area
 * @vi_handle[IN]: vi module handle
 * @p_mask[IN]: main & sub channel mask area paramters
 * return: 0 success, -1 failed
 * notes: 
 */
int ak_mask_set_area(const void *vi_handle, const struct mask_area_info *mask);

/**  
 * brief: get main & sub channel mask area
 * @vi_handle[IN]: vi module handle
 * @p_mask[OUT]: main & sub channel mask area paramters
 * return: 0 success, -1 failed
 * notes: 
 */
int ak_mask_get_area(const void *vi_handle, struct mask_area_info *mask);

/**  
 * brief: set main & sub channel mask color
 * @vi_handle[IN]: vi module handle
 * @p_mask[IN]: main & sub channel mask color paramters
 * return: 0 success, -1 failed
 * notes: 
 */
int ak_mask_set_color(const void *vi_handle, const struct mask_color_info *mask);

/**  
 * brief: get main & sub channel mask color
 * @vi_handle[IN]: vi module handle
 * @p_mask[OUT]: main & sub channel mask color paramters
 * return: 0 success, -1 failed
 * notes: 
 */
int ak_mask_get_color(const void *vi_handle, struct mask_color_info *mask);

#endif
